<include file='Common:header'/>
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>
<script charset="utf-8" type="text/javascript" src="__PUBLIC__/includes/javascript/jquery.plugins/jquery.validate.js" ></script>
<script type="text/javascript" src="__PUBLIC__/admin/my97/WdatePicker.js"></script>
<script src="__PUBLIC__/includes/javascript/highchart/js/highcharts.js"></script>
<script src="__PUBLIC__/includes/javascript/highchart/js/modules/exporting.js"></script>
<style type="text/css">
	select {
		opacity : 1;
		border: 1px solid silver;
		height: 25px;
		margin-top: 5px;
	}
</style>
<script type="text/javascript">
//<!CDATA[
$(function(){
	
    $('#appForm').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        onkeyup    : false,
        rules : {
        	brand_name: {
                required: true
            },
            title: {
                required: true
            },
            notice: {
                required: true
            },
            description: {
                required: true
            },
            start_time: {
                required: true
            },
            end_time: {
                required: true
            },
            
            skuNum: {
                required : true,
                number:true
            },
            use_limit: {
            	number:true
            },
            get_limit: {
            	number:true
            },
            least_cost: {
            	number:true
            },
            reduce_cost: {
                required: true,
                number:true
            }
            
            
        },
        messages : {
        	brand_name: {
                required: '请输入商户名字'
            },
            title: {
                required: '请输入券名'
            },
            notice: {
                required: '请输入使用提醒'
            },
            description: {
                required: '请输入使用说明'
            },
            start_time: {
                required: '请输入开始时间'
            },
            end_time: {
                required: '请输入结束时间'
            },
            skuNum: {
                required: '请输入卡券库存的数量',
                number:'请输入数字'
            },
            use_limit: {
                number:'请输入数字'
            },
            get_limit: {
                number:'请输入数字'
            },
            least_cost: {
                number:'请输入数字'
            },
            reduce_cost: {
                required: '请输入减免金额',
                number:'请输入数字'
            }
            
            
        }
    });
});


function checkFile() {
	if($("#csv").val() == "") {
		alert("请上传数据文件！");
		return false;
	}
}


//]]>
</script>
<style>
	.info2{
		margin-left:100px;
		margin-top: 20px;
	}
	.info2 table tr th{
		line-height:40px;
		text-align:left;
	}
	.info2 p{
		line-height:20px;
		margin-top: 10px;
	}
	.submit_btn{
		width: 137px;
		height: 35px;
		background: url(__PUBLIC__/admin/images/btnbg.png) no-repeat;
		font-size: 14px;
		font-weight: bold;
		color: #fff;
		cursor: pointer;
	}
</style>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">客户等级统计分析</a></li>
    </ul>
</div>

	
	
<div class="formbody">
		<div id="tab2" class="tabson">
 			<div class="table-responsive">
					<div id="container1" style="width: 1000px; height: 400px; margin: 0 auto; margin-top: 30px;"></div>
			</div>
		</div>
</div>
 <include file='Common:footer'/>
 
 <SCRIPT type="text/javascript">
 $(function () {
	    var chart;
	    
	    $(document).ready(function () {
	    	
	    	// Build the chart
	        chart = new Highcharts.Chart({
	            chart: {
	                renderTo: 'container1',
	                plotBackgroundColor: null,
	                plotBorderWidth: null,
	                plotShadow: false
	            },
	            title: {
	                text: '客户等级统计分析'
	            },
	            tooltip: {
	        	    pointFormat: '{series.name}: <b>{point.percentage}%</b>',
	            	percentageDecimals: 1
	            },
	            plotOptions: {
	                pie: {
	                    allowPointSelect: true,
	                    cursor: 'pointer',
	                    dataLabels: {
	                        enabled: true,
	                        color: '#000000',
	                        connectorColor: '#000000',
	                        formatter: function() {
	                            return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';
	                        }
	                    },
	                    showInLegend: true
	                }
	            },
	            series: [{
	                type: 'pie',
	                name: '比例',
	                data: [
	                       ['普通客户',   <{$normal}>],
	                       ['金牌客户',       <{$gold}>],
	                       {
	                           name: '钻石客户',
	                           y: <{$diamond}>,
	                           sliced: true,
	                           selected: true
	                       },
	                       ['新客户',    <{$new}>],
	                      
	                   ]
	            }]
	        });
	    });
	    
	});
 

 </SCRIPT>